#pragma once

#include "IFourierTransform.h"
#include "availabilitycheckhelper.h"
#include "FourierTransformFactoryBase.h"

//class CFourierTransformFactoryCuFft : public FTLib::IFourierTransformFactory, public CFourierTransformFactoryBase < CFourierTransformFactoryCuFft >
//{
//public:
//	CFourierTransformFactoryCuFft(const std::wstring& initializationString);
//	virtual std::shared_ptr<FTLib::IRealToComplex_PackedFftwComplex> CreateRealToComplexPackedFftw(const Options& opts);
//	virtual std::shared_ptr<FTLib::IRealToComplex_PackedIppComplex> CreateRealToComplexPackedIpp(const Options& opts);
//	virtual std::shared_ptr<FTLib::IRealToComplex_Complex> CreateRealToComplex(const Options& opts);
//	virtual std::shared_ptr<FTLib::IRealToComplex_Complex> CreateRealToComplex_Shifted(const Options& opts);
//	virtual std::shared_ptr<FTLib::IComplexToComplex_Complex> CreateComplexToComplex(const Options& opts);
//protected:
//	friend class CFourierTransformFactoryBase < CFourierTransformFactoryCuFft > ;
//	static bool CanLoadLibrary();
//	static bool CanOperate();
//};
//

class CFourierTransformFactoryCuFft : public CFourierTransformFactoryBaseEmptyDefaultImp < CFourierTransformFactoryCuFft >
{
public:
	static void GetVersionString(std::wstring& str);
public:
	CFourierTransformFactoryCuFft(const std::wstring& initializationString);
	virtual std::shared_ptr<FTLib::IRealToComplex_PackedFftwComplex> CreateRealToComplexPackedFftw(const Options& opts);
	//virtual std::shared_ptr<FTLib::IRealToComplex_PackedIppComplex> CreateRealToComplexPackedIpp(const Options& opts);
	virtual std::shared_ptr<FTLib::IRealToComplex_Complex> CreateRealToComplex(const Options& opts);
	virtual std::shared_ptr<FTLib::IRealToComplex_Complex> CreateRealToComplex_Shifted(const Options& opts);
	virtual std::shared_ptr<FTLib::IComplexToComplexFwd_Complex> CreateComplexToComplexFwd(const Options& opts);
	virtual std::shared_ptr<FTLib::IComplexToComplexInv_Complex> CreateComplexToComplexInv(const Options& opts);
	virtual std::shared_ptr<FTLib::IComplexHermitianToReal> CreateComplexHermitianToReal(const Options& opts);
protected:
	friend class CFourierTransformFactoryBase < CFourierTransformFactoryCuFft > ;
	static bool CanLoadLibrary();
	static bool CanOperate();

	static double CalculateNormalization(const Options& opts);
};

